home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4683 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP - Can C++ read a Synchronous Data stream?
  5. Date: 31 Jan 1996 17:18:19 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4eo88r$kmc@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe4.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Jan 30, 1996 20:37:53 in article <HELP - Can C++ resd a Synchronous Data
  15. stream?>, 'Joe Cardani <IE17N1L@TJUVM.tju.edu>' wrote: 
  16.  
  17.  
  18. >     
  19. >I'm considering purchasing C++ and learning the language in order 
  20. >to program a specific application. 
  21. >I wish to read a continuous data stream from the  
  22. >COM 1 port of thePC (which is synchronous) 
  23. >buffer the contents, and search for a specific word in the buffer. 
  24. >Then convert the binary to HEX and print it out. Is this someting 
  25. >that C++ can handle. 
  26. Yes, and no.  The language does not deal with operating system 
  27. specific functions; i.e., reading comm ports.  Many (all?) 
  28. compiler vendors for DOS, however, provide some means of 
  29. accomplishing it -- I assume DOS from the content of your  
  30. question, sorry if I'm wrong. 
  31.  
  32. Regarding "convert the binary to HEX and print it out", I can't 
  33. say with 100% certainty as it is unclear as to what you mean. 
  34. If you're talking about displaying an integer in hex notation 
  35. rather than the usual base 10, then yes, of course.  But you're 
  36. talking about reading words and converting the binary to 
  37. hex.  I'm fairly sure that C++ 'can handle it'. 
  38.  
  39. -- 
  40. Pete Grant 
  41. Kalevi, Inc. 
  42. Object Oriented Software Development
  43.